﻿@using KPIS.GERP.Models.ICM
@model MasContact

@{
    bool noLayout = ViewBag.NoLayout == true;
    var MasLookUpService = new KPIS.GERP.WEB.GIMS.IcmMasLookUpService.IcmMasLookUpServiceClient();
}

@if (ViewContext.RouteData.Values["action"].ToString().ToLower() == "edit")
{
    @Html.HiddenFor(model => model.ConId)
}
@Html.Hidden("NoLayout", noLayout)
@Html.Hidden("category", ViewBag.Category as int?)
@Html.HiddenFor(model => model.ConCategory)
@Html.HiddenFor(model => model.RecordStatus)
@Html.HiddenFor(model => model.CreatedBy)
@Html.HiddenFor(model => model.CreatedWhen)
@Html.HiddenFor(model => model.UpdatedBy)
@Html.HiddenFor(model => model.UpdatedWhen)
@Html.HiddenFor(model => model.UpdatedWhen)


<div class="widget-box">
	<div class="widget-header header-color-blue2">
        <h4 class="lighter smaller">ข้อมูลหลัก</h4>
    </div>
    <div class="widget-body">
        <div class="widget-body-inner">
			<div class="widget-main">
                <div class="control-group">
                    <div class="control-label">
                        ชื่อผู้ขาย (TH)
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.NameTh)
                        @Html.ValidationMessageFor(model => model.NameTh)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        ชื่อผู้ขาย (EN)
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.NameEng)
                        @Html.ValidationMessageFor(model => model.NameEng)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        กลุ่มของผู้ติดต่อ
                    </div>
                    <div class="controls">
                        @Html.DropDownListFor(model => model.ConGrpId, MasLookUpService.MasLookUpSelectList(KPIS.GERP.Models.ICM.IcmMasLookUpType.LookUpType.ContactGroup)
                        , new { @class="chzn-select" })
                        @Html.ValidationMessageFor(model => model.ConGrpId)
                    </div>            
                </div>
                <div class="control-group">
                    <div class="control-label">
                        ภาษีมูลค่าเพิ่ม (Vat)
                    </div>
                    <div class="controls">
                        @Html.DropDownListFor(model => model.VatTypeId, MasLookUpService.MasLookUpSelectList(KPIS.GERP.Models.ICM.IcmMasLookUpType.LookUpType.VatType)
                        , new { @class="chzn-select" })
                        @Html.ValidationMessageFor(model => model.VatTypeId)
                    </div>            
                </div>
                <div class="control-group">
                    <div class="control-label">
                        เลขที่ผู้เสียภาษีบุคคลธรรมดา/นิติบุคคล
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.TaxCode)
                        @Html.ValidationMessageFor(model => model.TaxCode)
                    </div>
                </div>
                <div id="divCompany">
                    <div class="control-group">
                        <div class="control-label">
                            วันที่จดทะเบียน
                        </div>
                        <div class="controls">
                            @Html.EditorFor(model => model.RegistedDate, "DateTime")
                            @Html.ValidationMessageFor(model => model.RegistedDate)
                        </div>
                    </div>
                    <div class="control-group">
                        <div class="control-label">
                            ทุนจดทะเบียน
                        </div>
                        <div class="controls">
                           
                            @Html.EditorFor(model => model.RegistedCapital, new {@class="number"}) 
                              

                            บาท 
                            @Html.ValidationMessageFor(model => model.RegistedCapital)
                            
                        </div>
                    </div>
                </div>
                
                <div class="control-group">
                    <div class="control-label">
                        รหัสอ้างอิงกับระบบ GFMIS
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.GfmisCode)
                        @Html.ValidationMessageFor(model => model.GfmisCode)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        ชื่อผู้ประสานงาน
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.Coordinator)
                        @Html.ValidationMessageFor(model => model.Coordinator)
                    </div>
                </div>

                <hr />

                <div class="control-group">
                    <div class="control-label">
                        ที่อยู่เลขที่
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.Address)
                        @Html.ValidationMessageFor(model => model.Address)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        อาคาร
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.Building)
                        @Html.ValidationMessageFor(model => model.Building)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        ชั้น
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.Floor)
                        @Html.ValidationMessageFor(model => model.Floor)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        หมู่บ้าน
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.Village)
                        @Html.ValidationMessageFor(model => model.Village)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        ซอย
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.Lane)
                        @Html.ValidationMessageFor(model => model.Lane)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        ถนน
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.Road)
                        @Html.ValidationMessageFor(model => model.Road)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        แขวง/ตำบล
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.District)
                        @Html.ValidationMessageFor(model => model.District)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        เขต/อำเภอ
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.Amphur)
                        @Html.ValidationMessageFor(model => model.Amphur)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        จังหวัด
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.Province)
                        @Html.ValidationMessageFor(model => model.Province)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        ประเทศ
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.Country)
                        @Html.ValidationMessageFor(model => model.Country)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        รหัสไปรษณีย์
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.Postal)
                        @Html.ValidationMessageFor(model => model.Postal)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        โทรศัพท์
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.Tel) ต่อ @Html.EditorFor(model => model.TelNext)
                        @Html.ValidationMessageFor(model => model.Tel)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        โทรสาร
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.Fax) ต่อ @Html.EditorFor(model => model.FaxNext)
                        @Html.ValidationMessageFor(model => model.Fax)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        e-mail
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.Email)
                        @Html.ValidationMessageFor(model => model.Email)
                    </div>
                </div>

                <hr />

                <div class="control-group">
                    <div class="control-label">
                        สถานะของผู้ขาย
                    </div>
                    <div class="controls">
                        @Html.RadioButtonFor(model => model.ConStatusId, 51)<span class="lbl">  ติดต่อได้</span>
                        @Html.RadioButtonFor(model => model.ConStatusId, 52)<span class="lbl">  ขาดการติดต่อ</span>
                        @Html.RadioButtonFor(model => model.ConStatusId, 53)<span class="lbl">  Blacklist</span>
                        @Html.ValidationMessageFor(model => model.ConStatusId)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        หมายเหตุ
                    </div>
                    <div class="controls">
                        @Html.EditorFor(model => model.StatRemarks, "TextArea")
                        @Html.ValidationMessageFor(model => model.StatRemarks)
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
